<?php
/**
 * Create By: PhpStorm
 * User: yihua
 * File: UserConpon.php
 * Date: 2016/12/25
 * Time: 21:45
 */
namespace app\api\controller;

use app\api\model\page\user\GetUserCoupon as GetUserCouponModel;
use app\api\model\page\user\GetUserHistoryCoupon as GetUserHistoryCouponModel;
use app\api\model\page\user\AddUserCoupon as AddUserCouponModel;
use think\Request;

class UserCoupon
{
    private $param;

    public function __construct()
    {
        $this->param = Request::instance()->param();
    }

    public function getCouponList()
    {
        $userCouponModel = new GetUserCouponModel();
        return $userCouponModel->excute($this->param);
    }

    public function getHistoryCoupon()
    {
        $userCouponModel = new GetUserHistoryCouponModel();
        return $userCouponModel->excute($this->param);
    }

    public function addCoupon()
    {
        $userCouponModel = new AddUserCouponModel();
        return $userCouponModel->excute($this->param);

    }
}
